MODULE MOD_PHYTOPLANKTON
!******************************************************************
!***        DEFINE PARAMETERS RELATED TO PHYTOPLANKTON          ***
!***   PARAMETERS ARE LISTED ALPHABETICALLY FOR EACH CATEGORY   ***
!******************************************************************
     USE MOD_1D
     IMPLICIT NONE
     SAVE
     INTEGER               :: NNP              ! TOTAL NUMBER OF PHYTOPLANKTON
     INTEGER               :: INP              ! PHYTO INDEX USED IN VERTICAL MIXING

     LOGICAL               :: NO3_ON;          ! NH4 INHIBITION ON NO3

     CHARACTER(LEN=80)     :: L_FUNCTION       ! LIGHT FUNCTION SELECTION

     REAL(SPP), ALLOCATABLE :: ALPHAP(:)        ! LIGHT FUNCTION COEFFICIENT
     REAL(SPP), ALLOCATABLE :: ALPHA_U(:)       ! COEFFICIENT BETWEEN MULTIPLICAITON & MINIMUM
     REAL(SPP), ALLOCATABLE :: A_TP(:)          ! EXPONENTIAL FOR T FORCING
     REAL(SPP)              :: ATANU_C          ! ATTENUATION COEFFICIENT OF CHLOROPHYLL
     REAL(SPP)              :: ATANU_D          ! ATTENUATION COEFFICIENT OF DETRITUS
     REAL(SPP)              :: ATANU_W          ! ATTENUATION COEFFICIENT OF WATER
     REAL(SPP), ALLOCATABLE :: BETAP(:)         ! PHOTOINHIBITION COEFFICIENT
     REAL(SPP), ALLOCATABLE :: BIO_P(:,:)       ! PHYTO BIOMASS
     REAL(SPP), ALLOCATABLE :: CHL2C(:)         ! CHLOROPHYLL TO CARBON RATIO IN PHYTO
     REAL(SPP), ALLOCATABLE :: D_DOM(:)         ! ACTIVE EXUDATION COEFFICIENT
     REAL(SPP), ALLOCATABLE :: DPDOM(:)         ! COEFFICIENT OF PHYTO EXUDATION
     REAL(DPP), ALLOCATABLE :: FVP(:,:)         ! PHYTO AFTER THRESHOLD SUBSTRACTION
     REAL(SPP), ALLOCATABLE :: I_OPT(:)         ! OPTIMAL LIGHT FOR PHYTO
     REAL(SPP)              :: IRRAD0           ! IRRADIANCE AT THE SEA SURFACE
     REAL(SPP), ALLOCATABLE :: K_LIGHT(:)       ! HALF_SATURATION OF LIGHT FUNCTIONS
     REAL(SPP), ALLOCATABLE :: MPD(:)           ! PHYTO MORTALITY EOFFICIENT
     REAL(SPP), ALLOCATABLE :: M_P(:)           ! PHYTO MORTALITY ORDER
     REAL(SPP), ALLOCATABLE :: N_P(:)           ! POWER OF LIGHT FUNCTIONS
     REAL(SPP)              :: PARFRAC          ! PAR FRACTION
     REAL(SPP), ALLOCATABLE :: P_D(:,:)         ! PHYTO MORTALITY
     REAL(SPP), ALLOCATABLE :: P_DOM(:,:)       ! PHYTO EXUDATION OF DOM
     REAL(SPP), ALLOCATABLE :: P_N(:,:)         ! PHYTO RESPIRATION
     REAL(SPP), ALLOCATABLE :: P_0(:)           ! PHYTO THRESHOLD
     REAL(SPP)              :: RP_T             ! EXPONENTIAL FOR T FORCING ON RESPIRATION
     REAL(SPP), ALLOCATABLE :: R_P(:)           ! PHYTO RESPIRATION COEFFICIENT
     REAL(SPP), ALLOCATABLE :: TBIO(:,:)        ! ENSEMBLE VARIABLES FOR MIXING
     REAL(SPP), ALLOCATABLE :: T_OPTP(:)        ! OPTIMAL TEMPERATURE FOR PHYTO
     REAL(SPP), ALLOCATABLE :: ULR(:)           ! LIGHT GROWHT FACTOR FOR PHYTO
     REAL(SPP), ALLOCATABLE :: UMAX(:)          ! PHYTO MAXIMUM GROWTH RATE
     REAL(SPP), ALLOCATABLE :: UNR(:,:)         ! NUTRIENT GROWTH FACTOR FOR PHYTO
     REAL(SPP), ALLOCATABLE :: UNRMIN(:)        ! MINIMUM NUTRIENT FACTOR FOR PHYTO
     REAL(SPP), ALLOCATABLE :: U_P(:,:)         ! PHYTO GROWTH
     REAL(SPP), ALLOCATABLE :: UTR(:)           ! T GORWTH FACTOR FOR PHYTO
     REAL(DPP), ALLOCATABLE :: W_P(:)           ! SINKING VELOCITY OF PHYTO
     REAL(DPP), ALLOCATABLE :: WSNK_P(:,:)      ! SINKING FLUX OF PHYTO
END MODULE MOD_PHYTOPLANKTON
